Texture2D textureMap;

cbuffer cbPerObject
{
	float4x4 world;
	float4x4 view;
	float4x4 proj;
};

SamplerState samLinear
{
	Filter = MIN_MAG_MIP_LINEAR;
    AddressU = Wrap;
    AddressV = Wrap;
};

struct VS_Input
{
	float3 pos : POSITION;
	float2 tex : TEXCOORD;
};

struct PS_Input
{
	float4 pos : SV_POSITION;
	float2 tex : TEXCOORD;
};

PS_Input VS_Main( VS_Input input )
{
	PS_Input output;
	output.pos = mul( float4( input.pos, 1.0f ), world );
	output.pos = mul( output.pos, view );
	output.pos = mul( output.pos, proj );

	output.tex = input.tex;

	return output;
}

float4 PS_Main( PS_Input input ) : SV_TARGET
{
	return textureMap.Sample( samLinear, input.tex );
}

technique11 TexTechnique
{
	pass P0
	{
		SetVertexShader( CompileShader( vs_5_0, VS_Main( ) ) );
		SetGeometryShader( NULL );
		SetPixelShader( CompileShader( ps_5_0, PS_Main( ) ) );
	}
}